<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
<title>登录页面</title>
<link rel="stylesheet" href="/assets/layui-v2.2.5/css/layui.css" media="all"/>
<link rel="stylesheet" href="/assets/css/login.css" media="all"/>
<style>
	/* 覆盖原框架样式 */
	.layui-elem-quote{background-color: inherit!important;}
	.layui-input, .layui-select, .layui-textarea{background-color: inherit; padding-left: 30px;}
</style>
</head>
<body>
		<!-- Head -->
		<div class="layui-fluid">
			<div class="layui-row layui-col-space15">
				<div class="layui-col-sm12 layui-col-md12 zyl_mar_01">
					<blockquote class="layui-elem-quote">智慧党建登陆界面</blockquote>
				</div>
			</div>
		</div>
		<!-- Head End -->
		
		<!-- Carousel -->
		<div class="layui-row">
			<div class="layui-col-sm12 layui-col-md12">
				<div class="layui-carousel zyl_login_height" id="zyllogin" lay-filter="zyllogin">
					<div carousel-item="">
						<div>
							<img src="/assets/img/carousel/01.jpg" />
						</div>
					</div>
				</div>
			</div>
		</div>
		<!-- Carousel End -->
		
		<!-- Footer -->
		<div class="layui-row">
			<div class="layui-col-sm12 layui-col-md12 zyl_center zyl_mar_01">
				© 2015 - 河北泰佑信息技术有限公司
			</div>
		</div>
		<!-- Footer End -->
		
		
		
		<!-- LoginForm -->
		<div class="zyl_lofo_main">
			<fieldset class="layui-elem-field layui-field-title zyl_mar_02">
				<legend>欢迎登陆 - 智慧党建管理平台</legend>
			</fieldset>
			<div class="layui-row layui-col-space15">
				<form id="login_form" class="layui-form zyl_pad_01" action="/login/doLogin" method="post">
					<div class="layui-col-sm12 layui-col-md12">
						<div class="layui-form-item">
							<input type="text" name="loginName" autocomplete="off" placeholder="账号" class="layui-input">
							<i class="layui-icon layui-icon-username zyl_lofo_icon"></i>
						</div>
					</div>
					<div class="layui-col-sm12 layui-col-md12">
						<div class="layui-form-item">
							<input type="password" name="password"  autocomplete="off" placeholder="密码" class="layui-input">
							<i class="layui-icon layui-icon-password zyl_lofo_icon"></i>
						</div>
					</div>
					<div class="layui-col-sm12 layui-col-md12">
						<div class="layui-row">
							<div class="layui-col-xs4 layui-col-sm4 layui-col-md4">
								<div class="layui-form-item">
									<input type="text" name="captcha" id="vercode" autocomplete="off" placeholder="验证码" class="layui-input" maxlength="4">
									<i class="layui-icon layui-icon-vercode zyl_lofo_icon"></i>
								</div>
							</div>
							<div class="layui-col-xs4 layui-col-sm4 layui-col-md4">
								<!-- <div class="zyl_lofo_vercode zylVerCode" onclick="zylVerCode()"></div> -->
								<div style="margin-left: 10px;">
									<img src="/login/captcha" class="layadmin-user-login-codeimg" id="LAY-user-get-vercode"
									onclick="javascript:this.src='/login/captcha?' + new Date().getTime();">
								</div>
							</div>
						</div>
					</div>
					<div class="layui-col-sm12 layui-col-md12">
						 <div class="layui-form-item">
					      <input type="checkbox" name="remember" lay-skin="primary" title="记住密码">
					      <span style="float: right; margin-top: 7px;">
						      <a href="#forget" >忘记密码？</a>
						      <a href="/login/reg" >注册帐号</a>
					      </span>
					    </div>
				    </div>
					<div class="layui-col-sm12 layui-col-md12">
						<button type="submit" class="layui-btn layui-btn-fluid" id="login_btn">立即登录</button>
					</div>
				</form>
			</div>
		</div>
				
		<script type="text/javascript" src="/assets/js/jquery-1.4.4.min.js"></script>
		<script type="text/javascript" src="/assets/layui-v2.2.5/layui.js"></script>
		<script type="text/javascript" src="/assets/js/jquery.form.min.js"></script>
		<script>
			layui.use(['carousel', 'form'], function(){
				var carousel = layui.carousel
				,form = layui.form;
				
				//设置轮播主体高度
				var zyl_login_height = $(window).height()/1.3;
				var zyl_car_height = $(".zyl_login_height").css("cssText","height:" + zyl_login_height + "px!important");
				
				
				//Login轮播主体
			 	carousel.render({
					elem: '#zyllogin'//指向容器选择器
					,width: '100%' //设置容器宽度
					,height:'zyl_car_height'
					,arrow: 'always' //始终显示箭头
					,anim: 'fade' //切换动画方式
					,autoplay: true //是否自动切换false true
					,arrow: 'hover' //切换箭头默认显示状态||不显示：none||悬停显示：hover||始终显示：always
					,indicator: 'none' //指示器位置||外部：outside||内部：inside||不显示：none
					,interval: '5000' //自动切换时间:单位：ms（毫秒）
				});
			 	$("#login_form").ajaxForm({
					dataType: "json"
					, beforeSubmit: function(formData, jqForm, options) {
						// 表单提交之前回调
					}
					, success: function(ret) {
						if(ret.state == "ok") {
							location.href = ret.returnUrl;
						} else {
							layer.msg(ret.msg, {icon : 2, offset: '10px'});
							$("#LAY-user-get-vercode").click();
							$("#login_btn").attr("disabled", false);
						}
					}
					, error: function(ret) { }              // ret.status != 200 时回调
					, complete: function(ret) { }       // 无论是 success 还是 error，最终都会被回调
				});
			});
			
		</script>
	</body>
</html>